<html>
<head>
	<meta charset="UTF-8">
	<title>详情页面</title>
</head>
<body>
	<p>Hello Detail!</p>
	<button onclick='scan()'>扫描</button>
	
	<button onclick='home()'>回首页</button>

	<a href="index.html">APP</a>

<script type="text/javascript">
function scan(){

	var scanner = api.require('scanner');
	scanner.open(function(ret, err) {
	    if (ret) {
	        alert(JSON.stringify(ret));
	    } else {
	        alert(JSON.stringify(err));
	    }
	});
	
}
function home(){
api.closeToWin({name:'main'})

}

</script>
</body>
</html>